export default function debounceFunction(func, timeout = 500) {
    let timer = null;
    return function(...args) {
        clearTimeout(timer);
        timer = setTimeout(() => {
            func.call(this, ...args)
        }, timeout)
    }
}